home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / x2ftp / msdos / libs / 3dvect39 / objects.inc < prev    next >
Encoding:
Text File  |  1994-10-30  |  69.0 KB  |  1,699 lines

  1. ;░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  2. ;
  3. ; Filename     : objects.inc
  4. ; Included from: Main.asm
  5. ; Description  : Some sample objects for 3dVect.zip
  6. ;
  7. ; Written by: John McCarthy
  8. ;             1316 Redwood Lane
  9. ;             Pickering, Ontario.
  10. ;             Canada, Earth, Milky Way (for those out-of-towners)
  11. ;             L1X 1C5
  12. ;
  13. ; Internet/Usenet:  BRIAN.MCCARTHY@CANREM.COM
  14. ;         Fidonet:  Brian McCarthy 1:229/15
  15. ;   RIME/Relaynet: ->CRS
  16. ;
  17. ; Home phone, (905) 831-1944, don't call at 2 am eh!
  18. ;
  19. ; John Mccarthy would really love to work for a company programming Robots
  20. ; or doing some high intensive CPU work.  Hint. Hint.
  21. ;
  22. ; Send me your protected mode source code!
  23. ; Send me your Objects!
  24. ; But most of all, Send me a postcard!!!!
  25. ;
  26. ;░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  27.  
  28. setupbase:
  29.          mov _objbase[0*4],offset headercube4
  30.          mov _objbase[1*4],offset headercube2
  31.          mov _objbase[2*4],offset headerring
  32.          mov _objbase[3*4],offset headerdiamond
  33.          mov _objbase[4*4],offset headerrubine
  34.          mov _objbase[5*4],offset column
  35.          mov _objbase[6*4],offset archmiddle
  36.         ;mov _objbase[7*4],offset archend
  37.         ;mov _objbase[8*4],offset bigoildrum
  38.         ;mov _objbase[9*4],offset ship1
  39.          mov _objbase[5*4],offset headercube3
  40.          mov _objbase[6*4],offset headerarm
  41.  
  42.          ;mov _objbase[0*4],offset platform1
  43.          ;mov _objbase[1*4],offset platform2
  44.          ;mov _objbase[2*4],offset platform3
  45.          ;mov _objbase[0*4],offset ship1
  46.  
  47.          ;mov _objbase[0*4],offset futurecrewrip1
  48.          ;mov _objbase[0*4],offset formula
  49.          ;mov _objbase[0*4],offset inca
  50.          ;mov _objbase[0*4],offset htracer
  51.          ;mov _objbase[1*4],offset hacad1
  52.  
  53.          mov esi,0                          ; from object #
  54.          mov edi,6                          ; to object #
  55.          call _set_up_all_lambert           ; find and set up shading tables
  56.  
  57.          ret
  58.  
  59. ;░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  60. ; Shape data can be almost as large as you need it 'till it crashes. Try a cube
  61. ; 20000_x20000_x20000.    Calculations  use  32  bit  registers  and  can  handle
  62. ; up to 16 bit locations.  Keeping the object size small will  allow  a  larger
  63. ; visible space.  But larger objects will allow you to get  closer  with   more
  64. ; accuracy in the mathematics of rotations.  Remember, if you make a really big
  65. ; object, set minz to the largest object on the screen so the large object wont
  66. ; mess up when you get really close to it.  I have generally found that  larger
  67. ; objects "look" better as they have great mathematical resolution.
  68. ;░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  69. ;
  70. ; Format for objects:
  71. ;
  72. ; headerthing:
  73. ;  dd max,min    ; max = maximum distance object can be seen, min = closest
  74. ;                ; distance object is allowed to be seen (can be negative)
  75. ;                ; eg dd 5000000,200.  If negative, object must be made up
  76. ;                ; of only sub-objects!!!
  77. ;  dd res1       ; distance for resolution1, eg 6000
  78. ;  dd offset thing1 - offset $ - 4  ; pointer to resolution1
  79. ;  dd -1         ; last resolution flag
  80. ;  dd offset thing2 - offset $ - 4  ; pointer to resolution2
  81. ;
  82. ; thing1:
  83. ;  dw xx         ; number of points
  84. ;  dw yy         ; number of surfaces
  85. ;  dw 25 dup (0) ; 25 future use words/options
  86. ;
  87. ;  dw xx,yy,zz   ; x,y,z of point 0
  88. ;  dw xx,yy,zz   ; x,y,z of point 1
  89. ;  dw xx,yy,zz   ; x,y,z of point 2
  90. ;  ...
  91. ;
  92. ;  dw command
  93. ;  dw texture for side 1
  94. ;  dw texture for side 2
  95. ;  dw colour for side 1
  96. ;  dw colour for side 2
  97. ;  dw connection data eg (1,2,3,4,1)
  98. ;  dw [?,?,?] [optional surface normal if command 128 used]
  99. ;  dw more connection data...
  100. ;
  101. ; to re-cap: dw command,texture1,texture2,colour1,colour2,connection,[0,0,0]
  102. ;░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  103. ;
  104. ; List of texture bits to date: (options grouped by function:)
  105. ;
  106. ; Note: "visible" = "points appear counter-clockwise"
  107. ;
  108. ; Texture definitions:
  109. ;
  110. ;   0       - normal surface, no features, constant colour.
  111. ;   wavey   - steel texture for surface 0 = none,  colour  offset  determines
  112. ;             screen offset for texture.  eg 16+7 will use colour block 16-31
  113. ;             but make the sine wave texture 14 (7*2) lines down. this is  so
  114. ;             all sine wave textures do not appear on the same line.  Windows
  115. ;             and engines look good with this feature.  This  option  can  be
  116. ;             combined with shading  if  you  want  to  mis-align  sine  wave
  117. ;             patterns.
  118. ;   shade   - _lambert shading bit, must have normal calculated or  at  least
  119. ;             have    free    space     for    _pre_cal_lambert    to    use:
  120. ;             eg x,x,x,x,x,1,2,3,1,?,?,?<- these 3 words are surface normal!
  121. ;   inverse - inversion bit for shading option.  0=normal shading, 1=inverse
  122. ;             inversion automatically occures when other side is displayed.
  123. ;   glow    - =shade+inverse
  124. ;   last    - colour has same colour as previous surface (used when
  125. ;             you want gourad shading, but want to avoid  duplicate
  126. ;             calculations - don't set gourad bit if this  is  what
  127. ;             you use it for.) when this is used, the colour number
  128. ;             determines the new colour block to use.  the  shading
  129. ;             of this colour will be the same as the surface before
  130. ;             it, but the colour block can be different.
  131. ;   mesh    - see the line below? that sort if dot on/dot off thing? thats a
  132. ;             mesh texture.  can be combined with shading.
  133. ;   glenz   - glenz vector (you know, the stained glass type of  thingy)
  134. ;             The colour of surface refers to a cross referanced palette
  135. ;             from which the glenz polygon will derive it's new colours.
  136. ;             Put the cross referancing palette  offset  into  _xreftable
  137. ;             and make the colour index the palette in the table.  Glenz
  138. ;             vectors can be used with the shading  option  to  get  the
  139. ;             same type of effect as in  Second  Unreal.   Shaded  Glenz
  140. ;             Vectors are made by simply having multiple cross referance
  141. ;             palettes and setting the surface to  "shade".   This  will
  142. ;             select the appropriate table based on surface normal. This
  143. ;             option can be combined with shading.
  144. ;   stone   - this texture is like the stone texture I saw  in Alone In The
  145. ;             Dark.   The   stone   texture   offset    is    loaded   from
  146. ;             [_stonetbl+colour*4].  Use the Qbasic  program   stone.bas  to
  147. ;             generate more stone textures with different colours or ranges
  148. ;             This option can be combined with shading.
  149. ;
  150. ;░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  151. ;
  152. ; Commands:
  153. ;
  154. ;   point   - defines a single point; must be repeated! eg dw 64,col,3,3
  155. ;   line    - if used, defines a line (must be set to define a true line)
  156. ;   himap   - if set, defines a _bitmap,eg: point #, _bitmap #, x scale,y scale
  157. ;   lomap   - uses 1/4 scaled _bitmap (every 4'th pixel is sampled), fast
  158. ;
  159. ;   iterate - generate iteration if side visible (iteration = sub-object)
  160. ;   matrix  - modify matrix when generating iteration.  matrix object
  161. ;             offset is 3rd word (6'th byte) in future use words.
  162. ;
  163. ;   both    - side is always visible no matter angle, skips counter-clowise test
  164. ;           - "both sides have same texture"
  165. ;   double  - side is always visible but other side has other colour
  166. ;             "double sided surface"
  167. ;             note: if this is used, option "both" must not be used!!
  168. ;   onscr   - test if side is on screen - don't use if all points are
  169. ;             outside clipping parameters.
  170. ;   check   - dont plot this side, just use as test points for visibility.
  171. ;             this is mostly used with iterations.
  172. ;   gosub   - push current offset and go to another location (offset location - offset $)
  173. ;   return  - just like a qbasic return
  174. ;   goto    - like qbasic - go to another offset (offset location - offset $)
  175. ;   push_matrix        - push rotation matrix
  176. ;   pop_matrix         - pop rotation matrix
  177. ;   push_location      - push 3d centriodal location
  178. ;   pop_location       - pop 3d centroidal location
  179. ;   sub_object         - sub_object = matrix+check+iteration+both,?,?,?,?,0,0
  180. ;   static_sub_object  - non-rotatable sub_object = check+iteration+both,?,?,?,?,0,0
  181. ;░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  182. ;
  183. ; There are two kinds of _bitmaps and points.  Those which  are  inside  objects
  184. ; and those which are seperate objects themselves. If _userotate object  command
  185. ; is set to 32 or 64, then the entire object is considered to be either a point
  186. ; or _bitmap.  But if _userotate is not set this way, then  a  normal  object  is
  187. ; drawn and _bitmaps then come from within the object definitions (below).  this
  188. ; way, _bitmaps and points can be either part of a larger object,  or  they  are
  189. ; computed fast on their own. (eg explosions and bullets as  seperate  objects)
  190. ;░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  191. ;
  192. ; Note: when writing surface descriptions, try to make the  first value unique
  193. ; from any other first value.  This way, the sort routine  will  give  a  more
  194. ; accurate sorting of sides. eg 1,3,6,1  2,4,1,2  rather than 1,3,6,1  1,2,4,1
  195. ; If this doesnt give you what you want, then try making the first two  points
  196. ; the farthest points from the objects centroid.
  197. ;░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  198. ;
  199. ; To recap:
  200. ;
  201. ;        0 = constant colour, only visible from counter-clockwise side
  202. ;    wavey = sine texture
  203. ;    shade = shading - requires 3 blank words for surface normal eg dw 0,0,0
  204. ;  inverse = invert the shading direction, 0=normal, 1=sun is other way.
  205. ;     last = use intensity from previous surface (not colour, only intensity)
  206. ;     mesh = see through mesh - solid colour
  207. ;    glenz = cross referancing vector - load from screen, xrefs it, put back
  208. ;    stone = stone texture.  use stone.bas to make more textures.
  209. ;
  210. ;    point = point
  211. ;     line = line
  212. ;    himap = _bitmap (scalable, non-rotatable)
  213. ;    lomap = _bitmap (scalable, non-rotatable)
  214. ;  iterate = generate iteration if side visible
  215. ;     both = always visible
  216. ;   double = always visible but other side has high byte colour,"double sided"
  217. ;    onscr = plot side only if all the following points are on the screen
  218. ;    check = dont plot side but use the following points as a test for visiblity
  219. ;
  220. ; What you can't mix on a single surface: "double" with "both"!!
  221. ;░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  222. ;
  223. ; You do not have to define a point for the center of the  object.  the  point
  224. ; 0 defines the center of the object.  This is different from earlier versions
  225. ; This point will ALWAYS be calculated and will always be the zero'th point.
  226. ;
  227. ; Iterations may or may not have an extra centroid point calculated  for  you.
  228. ; Whether or not a new point is added to  the  points  list  is  dependant  on
  229. ; whether or not a new centroid must be calculated.  Hmmm, how  can  I explain
  230. ; this...Ok, centroids are calculated with new matricies or centroid  offsets,
  231. ; they are also calculated if the centroid flag is set (4'th word).  So,  what
  232. ; does this mean to the lowly reader (you).  Some examples of iterations where
  233. ; new points are added to points list.
  234. ;
  235. ; Eg:
  236. ;  an iteration where new centroid IS NOT calculated and IS NOT inserted
  237. ;
  238. ;   dw iteration,0,0,colour,0 ,1,2,3,4,1
  239. ;       dw 1,1
  240. ;       dw 25 dup (0)
  241. ;          x y z
  242. ;       dw 5,5,5                 ; point 20 (for example)
  243. ;       dw 0,0,0,colour, 20,5,20 ; notice how this surface uses newly created point
  244. ;
  245. ;  an iteration where new centroid IS calculated and IS inserted
  246. ;
  247. ;   dw iteration+matrix,0,0,colour,0 ,1,2,3,4,1
  248. ;       dw 1,1
  249. ;       dw 25 dup (0)
  250. ;          x y z
  251. ;       dw 5,5,5                 ; point is now 21 (because matrix calculated new centroid)
  252. ;       dw 0,0,0,colour, 21,5,21 ; same surface as above.
  253. ;
  254. ; The "sub_object" command also forces a centroid to be calculated, and will
  255. ; also insert a new point into the points list.  Be aware of it's presance!
  256. ;
  257. ; Note: The centroid is always calculated as the zero'th point. The above rules
  258. ; only apply to whether or not a new centroid will appear  as  an  EXTRA  point
  259. ; in an ITERATION.
  260. ;
  261. ; Questions to ask yourself in trying to figure out the above text:
  262. ;   Have I made an iteration that has any centroidal offset?
  263. ;   Have I used the matrix command?
  264. ;   Hahe I used the sub_object command?
  265. ;   Have I set bit 0 of the 4'th word in the 25 dup's to 1?
  266. ;   Am I sexually frustrated?
  267. ; If you answer yes to any of these questions, then a new centroidal point will
  268. ; be calculated and inserted into the points list even if you dont ask for it!
  269. ;
  270. ; If you want to negate the effects of centroid  point  insertion,  simply  set
  271. ; the 7'th word (14'th byte) in those 25 dup's to 1. See below for more info.
  272. ;
  273. ;░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  274. ;
  275. ; Here is a simple rundown of what those 25 extra words do:
  276. ;
  277. ;  dw x,y ; x=number of points,y=number of surfaces (but you knew that right?)
  278. ;
  279. ;  dw ? ; reserved for memory offset if an iteration is skipped   (leave blank)
  280. ;  dw ? ; reserved for point offset if an iteration is skipped    (leave blank)
  281. ;  dw ? ; reserved,is there a new center of gravity to calculate? (leave blank)
  282. ;       ; you could force this value to 1 (centroid in equ.inc) if you  wanted
  283. ;       ; to have a new centroid calculated with the iteration.
  284. ;  dw x,y,z ; new center-of-gravity point.  lets say you want a  subsurface  to
  285. ;           ; be offset by a certin spacial location, you can set these 3 words
  286. ;           ; to be "added" to any points you  are  adding  to  the  sub-object
  287. ;           ; listen bub, just mess around with it and you'll get  the  idea...
  288. ;  dw #     ; new load object offset for matrix compounding - this is only used
  289. ;           ; if the sub-object has a new matrix. (for rotation). commands like
  290. ;           ; matrix and sub_object access this word to determine where  in the
  291. ;           ; object lists (xs,ys,zs,_xadds,_zadds...) to get the  location and
  292. ;           ; rotation information about  the  sub-object.  check out the block
  293. ;           ; with the two smaller rotating  blocks  and  then look in main.asm
  294. ;           ; to figure out how to use this.  usual  values are 1 or 2, maybe 3
  295. ;           ; up to the number of extra sub_objects you've got.
  296. ;  dw #     ; connection data addition value.  this value  gets  added  to  the
  297. ;           ; connection data. eg: lets say you've got an object that starts at
  298. ;           ; point 3 and goes to 12, but you want to make it into a sub_object
  299. ;           ; (part of something larger) and you  want to change the connection
  300. ;           ; data to have a range of 25 to  36.  just put the value 22 in here
  301. ;           ; and all connection  data  within the object (and all sub_objects,
  302. ;           ; even in  sub_objects  within  sub_objects)  will  have this value
  303. ;           ; added to it.  this is usefull for, lets say,  making  a formation
  304. ;           ; of airplanes one big object instead  of  drawing  each individual
  305. ;           ; airplane. (if by some freak accident you wanted to do that)
  306. ;  dd #     ; maximum distance object can be seen (maxz)
  307. ;  dd #     ; minimum distance object can be seen (minz) - this can be negative
  308. ;           ; if you want.  but if it is  negative,  the  entire   object  must
  309. ;           ; be made up of sub-objects.  If these are left at zero, they  will
  310. ;           ; be forced to good values (_pre_cal_lambert does this).
  311. ;  dd #     ; screen tolerancing.  this is used to determine how  far  off  the
  312. ;           ; screen an object will remain visable.  past this, the object will
  313. ;           ; not be drawn.  try 1, then try 500. you'll  get  the  idea.  (get
  314. ;           ; close to the object.) if this is left  blank,  a  value  will  be
  315. ;           ; placed in for you.
  316. ;  dw 11 dup 0 ; future use bytes
  317. ;
  318. ; To re-cap, the 25 word header looks like this:
  319. ;
  320. ;offset         │length&type    │description
  321. ;───────────────┼───────────────┼──────────────────────────────────────────────
  322. ; 0             │1 word (resrvd)│offset to next iteration (skip entire iteration)
  323. ; 2             │1 word (resrvd)│number of points in entire iteration
  324. ; 4             │1 word (resrvd)│centroid flag (bit 0)
  325. ;
  326. ; 6             │3 words x,y,z  │new centroid for points (and all following iterations!)
  327. ; 12            │1 word         │"new object angle" matrix load location (from _vxs[],_vys[]... (single,eg: 1,2,3...)
  328. ; 14            │1 word         │connection data addition value (can be negative!)
  329. ; 16            │1 dword        │maximum distance object can be seen (maxz)
  330. ; 20            │1 dword        │minimum distance object can be seen (minz)
  331. ; 24            │1 dword        │screen tolerancing
  332. ;               │               │
  333. ; 28            │11 words       │future use
  334. ;░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
  335.  
  336.          align 4
  337.  
  338. headercube1 dd -1
  339.          dd offset cube1a - offset $ - 4
  340.  
  341. cube1a   dw 8                               ; how many points
  342.          dw 6                               ; how many surfaces
  343.          dw 25 dup (0)                      ; future use
  344.          ;    x   y   z
  345.          dw -270, 270, 270                  ;1
  346.          dw -270,-270, 270                  ;2
  347.          dw 270,-270, 270                   ;3
  348.          dw 270, 270, 270                   ;4
  349.          dw -270, 270,-270                  ;5
  350.          dw -270,-270,-270                  ;6
  351.          dw 270,-270,-270                   ;7
  352.          dw 270, 270,-270                   ;8
  353.  
  354.          dw 0,0,0,16*8+12 ,0 ,1,2,3,4,1     ; surface connection data, and colours
  355.          dw 0,wavey,0,16*7+6 ,0 ,8,7,6,5,8  ; end point=start point means done side
  356.          dw 0,wavey,0,16*3+9 ,0 ,4,3,7,8,4
  357.          dw 0,shade,0,16*5+0 ,0 ,5,6,2,1,5 ,0,0,0 ;<-- _lambert shading
  358.          dw 0,shade,0,16*2+0 ,0 ,5,1,4,8,5 ,0,0,0 ;<-- normal gets shoved
  359.          dw 0,shade,0,16*11+0 ,0 ,2,6,7,3,2 ,0,0,0 ;<-- here, leave blank
  360.  
  361. headercube2 dd -1
  362.          dd offset cube2a - offset $ - 4
  363.  
  364. cube2a   dw 8                               ; how many points
  365.          dw 9                               ; how many surfaces
  366.          dw 25 dup (0)
  367.          ;    x   y   z
  368.          dw -270, 270, 270                  ;1
  369.          dw -270,-270, 270                  ;2
  370.          dw 270,-270, 270                   ;3
  371.          dw 270, 270, 270                   ;4
  372.          dw -270, 270,-270                  ;5
  373.          dw -270,-270,-270                  ;6
  374.          dw 270,-270,-270                   ;7
  375.          dw 270, 270,-270                   ;8
  376.  
  377.          dw double,shade,wavey,16*4+0,16*6,1,2,3,4,1,0,0,0 ; command,txt1,txt2,col1,col2, surface connection data
  378.          dw 0,0,0,16*2+4 ,0,6,2,6           ; end point=start point means done side
  379.          dw 0,0,0,16*2+15,0,7,3,7           ; <-- these are lines
  380.          dw 0,0,0,16*2+12,0,8,4,8
  381.          dw 0,0,0,16*3+8 ,0,5,1,5
  382.          dw 0,0,0,16*4+10,0,6,7,6
  383.          dw 0,0,0,16*3+14,0,7,8,7
  384.          dw 0,0,0,16*7+13,0,8,5,8
  385.          dw 0,0,0,16*5+12,0,5,6,5
  386.  
  387. headercube3 dd 4000
  388.          dd offset cube3a - offset $ - 4
  389.          dd -1
  390.          dd offset cube3b - offset $ - 4
  391.  
  392. cube3a   dw 44                              ; how many points
  393.          dw 45                              ; how many surfaces
  394.          dw 25 dup (0)                      ; future use
  395.          ;    x   y   z
  396.          dw -70, 70, 70                     ;1
  397.          dw -70, 70, 35                     ;2
  398.          dw -70, 70, 0                      ;3
  399.          dw -70, 70,-35                     ;4
  400.  
  401.          dw -70,-70, 70                     ;5
  402.          dw -70,-70, 35                     ;6
  403.          dw -70,-70, 0                      ;7
  404.          dw -70,-70,-35                     ;8
  405.  
  406.          dw 70,-70, 70                      ;9
  407.          dw 70,-70, 35                      ;10
  408.          dw 70,-70, 0                       ;11
  409.          dw 70,-70,-35                      ;12
  410.  
  411.          dw 70, 70, 70                      ;13
  412.          dw 70, 70, 35                      ;14
  413.          dw 70, 70, 0                       ;15
  414.          dw 70, 70,-35                      ;16
  415.  
  416.          dw -70, 70,-70                     ;17
  417.          dw -70, 35,-70                     ;18
  418.          dw -70, 0,-70                      ;19
  419.          dw -70,-35,-70                     ;20
  420.          dw -70,-70,-70                     ;21
  421.  
  422.          dw 70, 70,-70                      ;22
  423.          dw 70, 35,-70                      ;23
  424.          dw 70, 0,-70                       ;24
  425.          dw 70,-35,-70                      ;25
  426.          dw 70,-70,-70                      ;26
  427.  
  428.          dw -70, 35, 70                     ;27
  429.          dw -70, 0, 70                      ;28
  430.          dw -70,-35, 70                     ;29
  431.  
  432.          dw 70, 35, 70                      ;30
  433.          dw 70, 0, 70                       ;31
  434.          dw 70,-35, 70                      ;32
  435.  
  436.          dw -35,-70, 70                     ;33
  437.          dw 0,-70, 70                       ;34
  438.          dw 35,-70, 70                      ;35
  439.  
  440.          dw -35,-70,-70                     ;36
  441.          dw 0,-70,-70                       ;37
  442.          dw 35,-70,-70                      ;38
  443.  
  444.          dw -35, 70,-70                     ;39
  445.          dw 0, 70,-70                       ;40
  446.          dw 35, 70,-70                      ;41
  447.  
  448.          dw -35, 70, 70                     ;42
  449.          dw 0, 70, 70                       ;43
  450.          dw 35, 70, 70                      ;44
  451.  
  452.          dw himap,01,0,15,15
  453.          dw himap,02,0,15,15
  454.          dw himap,03,0,15,15
  455.          dw himap,04,0,15,15
  456.          dw himap,05,0,15,15
  457.          dw himap,06,0,15,15
  458.          dw himap,07,0,15,15
  459.          dw himap,08,0,15,15
  460.          dw himap,09,0,15,15
  461.          dw himap,10,0,15,15
  462.          dw himap,11,0,15,15
  463.          dw himap,12,0,15,15
  464.          dw himap,13,0,15,15
  465.          dw himap,14,0,15,15
  466.          dw himap,15,0,15,15
  467.          dw himap,16,0,15,15
  468.          dw himap,17,0,15,15
  469.          dw himap,18,0,15,15
  470.          dw himap,19,0,15,15
  471.          dw himap,20,0,15,15
  472.          dw himap,21,0,15,15
  473.          dw himap,22,0,15,15
  474.          dw himap,23,0,15,15
  475.          dw himap,24,0,15,15
  476.          dw himap,25,0,15,15
  477.          dw himap,26,0,15,15
  478.          dw himap,27,0,15,15
  479.          dw himap,28,0,15,15
  480.          dw himap,29,0,15,15
  481.          dw himap,30,0,15,15
  482.          dw himap,31,0,15,15
  483.          dw himap,32,0,15,15
  484.          dw himap,33,0,15,15
  485.          dw himap,34,0,15,15
  486.          dw himap,35,0,15,15
  487.          dw himap,36,0,15,15
  488.          dw himap,37,0,15,15
  489.          dw himap,38,0,15,15
  490.          dw himap,39,0,15,15
  491.          dw himap,40,0,15,15
  492.          dw himap,41,0,15,15
  493.          dw himap,42,0,15,15
  494.          dw himap,43,0,15,15
  495.          dw himap,44,0,15,15
  496.  
  497.          dw himap,0,0,30,30                 ; center, change to lomap and see!
  498.  
  499. cube3b   dw 44                              ; this is same as above but since _bitmaps can't be seen
  500.          dw 44                              ; from far, i use the same cube with points instead.
  501.          dw 25 dup (0)                      ; future use
  502.          ;    x   y   z
  503.          dw -70, 70, 70                     ;1  ; this is an example of how to use the
  504.          dw -70, 70, 35                     ;2  ; different resolutions based on distance
  505.          dw -70, 70, 0                      ;3  ; you could get rid of half of these points
  506.          dw -70, 70,-35                     ;4  ; and still have it "look" the same because
  507.  
  508.          dw -70,-70, 70                     ;5  ; of the great distance at which this will
  509.          dw -70,-70, 35                     ;6  ; be seen
  510.          dw -70,-70, 0                      ;7
  511.          dw -70,-70,-35                     ;8
  512.  
  513.          dw 70,-70, 70                      ;9
  514.          dw 70,-70, 35                      ;10
  515.          dw 70,-70, 0                       ;11
  516.          dw 70,-70,-35                      ;12
  517.  
  518.          dw 70, 70, 70                      ;13
  519.          dw 70, 70, 35                      ;14
  520.          dw 70, 70, 0                       ;15
  521.          dw 70, 70,-35                      ;16
  522.  
  523.          dw -70, 70,-70                     ;17
  524.          dw -70, 35,-70                     ;18
  525.          dw -70, 0,-70                      ;19
  526.          dw -70,-35,-70                     ;20
  527.          dw -70,-70,-70                     ;21
  528.  
  529.          dw 70, 70,-70                      ;22
  530.          dw 70, 35,-70                      ;23
  531.          dw 70, 0,-70                       ;24
  532.          dw 70,-35,-70                      ;25
  533.          dw 70,-70,-70                      ;26
  534.  
  535.          dw -70, 35, 70                     ;27
  536.          dw -70, 0, 70                      ;28
  537.          dw -70,-35, 70                     ;29
  538.  
  539.          dw 70, 35, 70                      ;30
  540.          dw 70, 0, 70                       ;31
  541.          dw 70,-35, 70                      ;32
  542.  
  543.          dw -35,-70, 70                     ;33
  544.          dw 0,-70, 70                       ;34
  545.          dw 35,-70, 70                      ;35
  546.  
  547.          dw -35,-70,-70                     ;36
  548.          dw 0,-70,-70                       ;37
  549.          dw 35,-70,-70                      ;38
  550.  
  551.          dw -35, 70,-70                     ;39
  552.          dw 0, 70,-70                       ;40
  553.          dw 35, 70,-70                      ;41
  554.  
  555.          dw -35, 70, 70                     ;42
  556.          dw 0, 70, 70                       ;43
  557.          dw 35, 70, 70                      ;44
  558.  
  559.          dw 0,0,0,28,0, 01,01
  560.          dw 0,0,0,28,0, 02,02
  561.          dw 0,0,0,28,0, 03,03
  562.          dw 0,0,0,28,0, 04,04
  563.          dw 0,0,0,28,0, 05,05
  564.          dw 0,0,0,28,0, 06,06
  565.          dw 0,0,0,28,0, 07,07
  566.          dw 0,0,0,28,0, 08,08
  567.          dw 0,0,0,28,0, 09,09
  568.          dw 0,0,0,28,0, 10,10
  569.          dw 0,0,0,28,0, 11,11
  570.          dw 0,0,0,28,0, 12,12
  571.          dw 0,0,0,28,0, 13,13
  572.          dw 0,0,0,28,0, 14,14
  573.          dw 0,0,0,28,0, 15,15
  574.          dw 0,0,0,28,0, 16,16
  575.          dw 0,0,0,28,0, 17,17
  576.          dw 0,0,0,28,0, 18,18
  577.          dw 0,0,0,28,0, 19,19
  578.          dw 0,0,0,28,0, 20,20
  579.          dw 0,0,0,28,0, 21,21
  580.          dw 0,0,0,28,0, 22,22
  581.          dw 0,0,0,28,0, 23,23
  582.          dw 0,0,0,28,0, 24,24
  583.          dw 0,0,0,28,0, 25,25
  584.          dw 0,0,0,28,0, 26,26
  585.          dw 0,0,0,28,0, 27,27
  586.          dw 0,0,0,28,0, 28,28
  587.          dw 0,0,0,28,0, 29,29
  588.          dw 0,0,0,28,0, 30,30
  589.          dw 0,0,0,28,0, 31,31
  590.          dw 0,0,0,28,0, 32,32
  591.          dw 0,0,0,28,0, 33,33
  592.          dw 0,0,0,28,0, 34,34
  593.          dw 0,0,0,28,0, 35,35
  594.          dw 0,0,0,28,0, 36,36
  595.          dw 0,0,0,28,0, 37,37
  596.          dw 0,0,0,28,0, 38,38
  597.          dw 0,0,0,28,0, 39,39
  598.          dw 0,0,0,28,0, 40,40
  599.          dw 0,0,0,28,0, 41,41
  600.          dw 0,0,0,28,0, 42,42
  601.          dw 0,0,0,28,0, 43,43
  602.          dw 0,0,0,28,0, 44,44
  603.  
  604.          dw himap,0,0,30,30                 ; 0 = center of object
  605.  
  606. headerring dd -1
  607.          dd offset ringa - offset $ - 4
  608.  
  609. ringa    dw 32
  610.          dw 32
  611.          dw 25 dup (0)                      ; future use
  612.          ;    x   y   z
  613.          dw -40*4, 80*4, 30*4               ; 1
  614.          dw -80*4, 40*4, 30*4               ; 2
  615.          dw -80*4,-40*4, 30*4               ; 3
  616.          dw -40*4,-80*4, 30*4               ; 4
  617.          dw 40*4,-80*4, 30*4                ; 5
  618.          dw 80*4,-40*4, 30*4                ; 6
  619.          dw 80*4, 40*4, 30*4                ; 7
  620.          dw 40*4, 80*4, 30*4                ; 8
  621.          dw -40*4, 20*4, 45*4               ; 9
  622.          dw -40*4,-20*4, 45*4               ;10
  623.          dw -20*4,-40*4, 45*4               ;11
  624.          dw 20*4,-40*4, 45*4                ;12
  625.          dw 40*4,-20*4, 45*4                ;13
  626.          dw 40*4, 20*4, 45*4                ;14
  627.          dw 20*4, 40*4, 45*4                ;15
  628.          dw -20*4, 40*4, 45*4               ;16
  629.          dw -40*4, 80*4,-30*4               ;17
  630.          dw -80*4, 40*4,-30*4               ;18
  631.          dw -80*4,-40*4,-30*4               ;19
  632.          dw -40*4,-80*4,-30*4               ;20
  633.          dw 40*4,-80*4,-30*4                ;21
  634.          dw 80*4,-40*4,-30*4                ;22
  635.          dw 80*4, 40*4,-30*4                ;23
  636.          dw 40*4, 80*4,-30*4                ;24
  637.          dw -40*4, 20*4,-45*4               ;25
  638.          dw -40*4,-20*4,-45*4               ;26
  639.          dw -20*4,-40*4,-45*4               ;27
  640.          dw 20*4,-40*4,-45*4                ;28
  641.          dw 40*4,-20*4,-45*4                ;29
  642.          dw 40*4, 20*4,-45*4                ;30
  643.          dw 20*4, 40*4,-45*4                ;31
  644.          dw -20*4, 40*4,-45*4               ;32
  645.  
  646.          dw 0,shade,0,16*4+0,0 ,2,9,16,1,2 ,0,0,0 ; these  zeros   get   filled
  647.          dw 0,shade,0,16*4+0,0 ,3,10,9,2,3 ,0,0,0 ; with the calculated surface
  648.          dw 0,shade,0,16*4+0,0 ,4,11,10,3,4 ,0,0,0 ; normal.  we could calculate
  649.          dw 0,shade,0,16*4+0,0 ,5,12,11,4,5 ,0,0,0 ; them ourselves but god, too
  650.          dw 0,shade,0,16*4+0,0 ,6,13,12,5,6 ,0,0,0 ; much work.
  651.          dw 0,shade,0,16*4+0,0 ,7,14,13,6,7 ,0,0,0
  652.          dw 0,shade,0,16*4+0,0 ,8,15,14,7,8 ,0,0,0 ; remember, if you remove  the
  653.          dw 0,shade,0,16*4+0,0 ,1,16,15,8,1 ,0,0,0 ; shading parameter  then  you
  654.          dw 0,shade,0,16*4+0,0 ,1,17,18,2,1 ,0,0,0 ; must remove these 0's
  655.          dw 0,shade,0,16*4+0,0 ,2,18,19,3,2 ,0,0,0
  656.          dw 0,shade,0,16*4+0,0 ,3,19,20,4,3 ,0,0,0
  657.          dw 0,shade,0,16*4+0,0 ,4,20,21,5,4 ,0,0,0
  658.          dw 0,shade,0,16*4+0,0 ,5,21,22,6,5 ,0,0,0
  659.          dw 0,shade,0,16*4+0,0 ,6,22,23,7,6 ,0,0,0
  660.          dw 0,shade,0,16*4+0,0 ,7,23,24,8,7 ,0,0,0
  661.          dw 0,shade,0,16*4+0,0 ,8,24,17,1,8 ,0,0,0
  662.          dw 0,shade,0,16*4+0,0 ,10,26,25,9,10 ,0,0,0
  663.          dw 0,shade,0,16*4+0,0 ,11,27,26,10,11 ,0,0,0
  664.          dw 0,shade,0,16*4+0,0 ,12,28,27,11,12 ,0,0,0
  665.          dw 0,shade,0,16*4+0,0 ,13,29,28,12,13 ,0,0,0
  666.          dw 0,shade,0,16*4+0,0 ,14,30,29,13,14 ,0,0,0
  667.          dw 0,shade,0,16*4+0,0 ,15,31,30,14,15 ,0,0,0
  668.          dw 0,shade,0,16*4+0,0 ,15,16,32,31,15 ,0,0,0
  669.          dw 0,shade,0,16*4+0,0 ,32,16,9,25,32 ,0,0,0
  670.          dw 0,shade,0,16*4+0,0 ,18,25,26,19,18 ,0,0,0
  671.          dw 0,shade,0,16*4+0,0 ,19,26,27,20,19 ,0,0,0
  672.          dw 0,shade,0,16*4+0,0 ,20,27,28,21,20 ,0,0,0
  673.          dw 0,shade,0,16*4+0,0 ,21,28,29,22,21 ,0,0,0
  674.          dw 0,shade,0,16*4+0,0 ,22,29,30,23,22 ,0,0,0
  675.          dw 0,shade,0,16*4+0,0 ,23,30,31,24,23 ,0,0,0
  676.          dw 0,shade,0,16*4+0,0 ,24,31,32,17,24 ,0,0,0
  677.          dw 0,shade,0,16*4+0,0 ,17,32,25,18,17 ,0,0,0
  678.  
  679. headerdiamond dd -1
  680.          dd offset diamonda - offset $ - 4
  681.  
  682. diamonda dw 13
  683.          dw 17
  684.          dw 25 dup (0)                      ; future use
  685.  
  686.          dw -100*4, 50*4, 0
  687.          dw -100*4, -50*4, 0
  688.          dw -50*4,-100*4, 0
  689.          dw 50*4,-100*4, 0
  690.          dw 100*4, -50*4, 0
  691.          dw 100*4, 50*4, 0
  692.          dw 50*4, 100*4, 0
  693.          dw -50*4, 100*4, 0
  694.          dw -50*4, 50*4, 40*4
  695.          dw -50*4, -50*4, 40*4
  696.          dw 50*4, -50*4, 40*4
  697.          dw 50*4, 50*4, 40*4
  698.          dw 0*4, 0*4,-120*4
  699.  
  700.          dw both,shade+glenz,0,32,0 ,1,2,10,9,1,0,0,0
  701.          dw both,shade+glenz,0,32,0 ,10,3,4,11,10,0,0,0
  702.          dw both,shade+glenz,0,32,0 ,12,11,5,6,12,0,0,0
  703.          dw both,shade+glenz,0,32,0 ,8,9,12,7,8,0,0,0
  704.          dw both,shade+glenz,0,32,0 ,2,3,10,2,0,0,0
  705.          dw both,shade+glenz,0,32,0 ,11,4,5,11,0,0,0
  706.          dw both,shade+glenz,0,32,0 ,7,12,6,7,0,0,0
  707.          dw both,shade+glenz,0,32,0 ,1,9,8,1,0,0,0
  708.          dw both,shade+glenz,0,32,0 ,9,10,11,12,9,0,0,0
  709.          dw both,shade+glenz,0,32,0 ,8,13,1,8,0,0,0
  710.          dw both,shade+glenz,0,32,0 ,1,13,2,1,0,0,0
  711.          dw both,shade+glenz,0,32,0 ,2,13,3,2,0,0,0
  712.          dw both,shade+glenz,0,32,0 ,3,13,4,3,0,0,0
  713.          dw both,shade+glenz,0,32,0 ,4,13,5,4,0,0,0
  714.          dw both,shade+glenz,0,32,0 ,5,13,6,5,0,0,0
  715.          dw both,shade+glenz,0,32,0 ,6,13,7,6,0,0,0
  716.          dw both,shade+glenz,0,32,0 ,7,13,8,7,0,0,0
  717.  
  718. headerrubine dd -1
  719.          dd offset rubinea - offset $ - 4
  720.  
  721. rubinea  dw 16
  722.          dw 20                              ; 18 sides + 1 gosub + 1 return
  723.          dw 25 dup (0)                      ; future use
  724.  
  725.          dw -100*4, 50*4, 0*4               ; 1
  726.          dw -100*4, -50*4, 0*4              ; 2
  727.          dw -50*4,-100*4, 0*4               ; 3
  728.          dw 50*4,-100*4, 0*4                ; 4
  729.          dw 100*4, -50*4, 0*4               ; 5
  730.          dw 100*4, 50*4, 0*4                ; 6
  731.          dw 50*4, 100*4, 0*4                ; 7
  732.          dw -50*4, 100*4, 0*4               ; 8
  733.          dw -50*4, 50*4, 40*4               ; 9
  734.          dw -50*4, -50*4, 40*4              ;10
  735.          dw 50*4, -50*4, 40*4               ;11
  736.          dw 50*4, 50*4, 40*4                ;12
  737.          dw -50*4, 50*4, -40*4              ;13
  738.          dw -50*4, -50*4, -40*4             ;14
  739.          dw 50*4, -50*4, -40*4              ;15
  740.          dw 50*4, 50*4, -40*4               ;16
  741.  
  742.          dw 0,shade,0,32+0,0 ,1,2,10,9,1 ,0,0,0 ; these surfaces are tested 1st
  743.          dw 0,shade,0,32+0,0 ,10,3,4,11,10 ,0,0,0
  744.          dw 0,shade,0,32+0,0 ,12,11,5,6,12 ,0,0,0
  745.          dw 0,shade,0,32+0,0 ,8,9,12,7,8 ,0,0,0
  746.          dw 0,shade,0,32+0,0 ,2,3,10,2 ,0,0,0
  747.  
  748.          dw gosub,offset example_of_a_subroutine - offset $
  749.  
  750.          dw 0,shade,0,32+0,0 ,11,4,5,11 ,0,0,0 ; these surfaces are tested last
  751.          dw 0,shade,0,32+0,0 ,7,12,6,7 ,0,0,0
  752.          dw 0,shade,0,32+0,0 ,1,9,8,1 ,0,0,0
  753.          dw 0,shade,0,32+0,0 ,9,10,11,12,9 ,0,0,0
  754.          dw 0,shade,0,32+0,0 ,6,5,15,16,6 ,0,0,0
  755.          dw 0,shade,0,32+0,0 ,15,4,3,14,15 ,0,0,0 ; object exits here...
  756.  
  757. example_of_a_subroutine:
  758.          dw 0,shade,0,32+0,0 ,16,15,14,13,16 ,0,0,0 ; these surfaces are tested 2nd
  759.          dw 0,shade,0,32+0,0 ,13,14,2,1,13 ,0,0,0
  760.          dw 0,shade,0,32+0,0 ,7,16,13,8,7 ,0,0,0
  761.          dw 0,shade,0,32+0,0 ,5,4,15,5 ,0,0,0
  762.          dw 0,shade,0,32+0,0 ,14,3,2,14 ,0,0,0
  763.          dw 0,shade,0,32+0,0 ,8,13,1,8 ,0,0,0
  764.          dw 0,shade,0,32+0,0 ,6,16,7,6 ,0,0,0
  765.          dw return
  766.  
  767. ; This  object  is  an  example   of   how   to  use  the  iteration  command.
  768. ; Notice how  there  are  only   6 main  surfaces  and  then  5  sub  surfaces.
  769. ; If the main surface is not visible,then the sub surfaces are totally skipped.
  770. ; _pre_cal_lambert calculates the code offsets in case side is not visible,  but
  771. ; I have provided a few to give you an example of what _pre_cal_lambert will do.
  772.  
  773. ; This demonstrates only one level of iteration, you can have as  many
  774. ; levels as you want.  Notice how sub iterations are written just like
  775. ; main objects.
  776.  
  777. ; Concave surfaces work well when put inside iterations (saves cpu time), but
  778. ; convex surfaces don't work well. eg, insides  of  volcanos  are  great  for
  779. ; cutting cpu time, but exterior things like rooftop buildings must  be  done
  780. ; seperatly (Hint - Inlay the rooftop building below the edge of the roof and
  781. ; you can now have the building and all the stuff on the roof in a iteration)
  782.  
  783. ; Iterations save MEGA cpu time!!!
  784.  
  785.          align 4
  786.  
  787. headercube4 dd -1                           ; -1=end flag (last resolution)
  788.          dd offset cube4a - offset $ - 4
  789.  
  790. cube4a   dw 8                               ; how many points
  791.          dw 6                               ; how many surfaces
  792.          dw 25 dup (0)                      ; future use
  793.          ;    x   y   z
  794.          dw -70*4, 70*4, 70*4               ;1 ; the main cube (defines exterior for checking)
  795.          dw -70*4,-70*4, 70*4               ;2
  796.          dw 70*4,-70*4, 70*4                ;3
  797.          dw 70*4, 70*4, 70*4                ;4
  798.          dw -70*4, 70*4,-70*4               ;5
  799.          dw -70*4,-70*4,-70*4               ;6
  800.          dw 70*4,-70*4,-70*4                ;7
  801.          dw 70*4, 70*4,-70*4                ;8
  802.  
  803.          dw check+iterate,0,0,0,0,1,2,3,1   ; test main surface, dont plot, just check dot product
  804.  
  805.          dw 4                               ; 4 extra points if visible    (for this iteration, doesn't
  806.          dw 5                               ; 5 extra surfaces if visible   include iterations of iterations)
  807.  
  808.          dw 0                               ; reserved for offset of new startup location if failure - directs code to next valid surface
  809.          dw 0                               ; reserved for TOTAL number of points to skip if failure - ends up as 4, number of points within iteration
  810.  
  811.          dw 23 dup (0)                      ; for future use
  812.  
  813.          ;    x   y   z
  814.          dw -45*4, 45*4, 70*4               ; 9
  815.          dw -45*4,-45*4, 70*4               ;10
  816.          dw 45*4,-45*4, 70*4                ;11
  817.          dw 45*4, 45*4, 70*4                ;12
  818.  
  819.          ; these sides are always visible (both) because the above  check
  820.          ; confirmed the dot product.  setting "both" option saves time for
  821.          ; checking each surface because the main surface was  visible.
  822.          ; this saves 2 imuls per surface. eg: check the  main  surface
  823.          ; for visibility and all sub surfaces must also be visible.
  824.  
  825.          dw both,glow ,0, 16*4+0,0,9,10,11,12,9, 0,0,0 ; glow is inverse gouraud shading, what the heck, lets get creative...
  826.          dw both,shade,0, 16*3+0,0,1,2,10,9,1 ,0,0,0
  827.          dw both,last ,0, 16*3+0,0,2,3,11,10,2 ; last = use previous colour (uses gourad)
  828.          dw both,last ,0, 16*3+0,0,3,4,12,11,3 ; previous surface must always
  829.          dw both,last ,0, 16*3+0,0,4,1,9,12,4 ; be visible if this is used
  830.  
  831.          dw check+iterate,0,0,0,0 ,8,7,6,8  ; testing visibility only requires a triangle, not whole surface
  832.  
  833.          dw 4                               ; same as above but different points used...
  834.          dw 5
  835.  
  836.          dw 25 dup (0)
  837.  
  838.          ;    x   y   z
  839.          dw -45*4, 45*4,-70*4               ;13
  840.          dw -45*4,-45*4,-70*4               ;14
  841.          dw 45*4,-45*4,-70*4                ;15
  842.          dw 45*4, 45*4,-70*4                ;16
  843.  
  844.          dw both,glow ,0,16*2+0,0,13,16,15,14,13, 0,0,0
  845.          dw both,shade,0,16*7+0,0,5,13,14,6,5 , 0,0,0
  846.          dw both,last ,0,16*7+0,0,6,14,15,7,6
  847.          dw both,last ,0,16*7+0,0,7,15,16,8,7
  848.          dw both,last ,0,16*7+0,0,8,16,13,5,8
  849.  
  850.          dw check+iterate,0,0,0,0 ,4,3,7,4
  851.  
  852.          dw 4                               ; concave side, notice how I use the commands below because
  853.          dw 5                               ; we know this side is concave.
  854.  
  855.          dw 25 dup (0)
  856.  
  857.          ;    x   y   z
  858.          dw 30*4, 45*4, 45*4                ;17 - make x=70 and plane will be flat
  859.          dw 30*4,-45*4, 45*4                ;18
  860.          dw 30*4,-45*4,-45*4                ;19
  861.          dw 30*4, 45*4,-45*4                ;20
  862.  
  863.          dw both,shade,0,16*6+0,0 ,17,18,19,20,17, 0,0,0
  864.          dw 0, shade,0,16*9+0,0 ,4,3,18,17,4, 0,0,0 ; <-commands here, i have removed
  865.          dw 0, shade,0,16*9+0,0 ,3,7,19,18,3, 0,0,0 ; "both", 'cause these sides are not
  866.          dw 0, shade,0,16*9+0,0 ,8,20,19,7,8, 0,0,0 ; on the same plane as the original
  867.          dw 0, shade,0,16*9+0,0 ,8,4,17,20,8, 0,0,0 ; iteration check
  868.  
  869.          dw check+iterate,0,0,0,0 ,5,6,2,5
  870.  
  871.          dw 4                               ; another concave side
  872.          dw 5
  873.  
  874.          dw 25 dup (0)
  875.  
  876.          ;    x   y   z
  877.          dw -30*4, 45*4, 45*4               ;21 ; points are accumulated from original.
  878.          dw -30*4,-45*4, 45*4               ;22 ; eg: <-this point will always be point #22
  879.          dw -30*4,-45*4,-45*4               ;23 ; regardless of whether the above iterations
  880.          dw -30*4, 45*4,-45*4               ;24 ; were processed.
  881.  
  882.          dw both,shade,0, 16* 2+0,0,21,24,23,22,21, 0,0,0
  883.          dw 0 ,shade,0, 16* 8+0,0,1,21,22,2,1, 0,0,0
  884.          dw 0 ,shade,0, 16* 8+0,0,5,24,21,1,5, 0,0,0
  885.          dw 0 ,shade,0, 16* 8+0,0,6,23,24,5,6, 0,0,0
  886.          dw 0 ,shade,0, 16* 8+0,0,6,2,22,23,6, 0,0,0
  887.  
  888.          dw check+iterate,0,0,0,0 ,5,1,4,5
  889.  
  890.          dw 4
  891.          dw 5
  892.  
  893.          dw 25 dup (0)
  894.  
  895.          ;    x   y   z
  896.          dw -45*4, 70*4,-45*4               ;25
  897.          dw -45*4, 70*4, 45*4               ;26
  898.          dw 45*4, 70*4, 45*4                ;27
  899.          dw 45*4, 70*4,-45*4                ;28
  900.  
  901.          dw both,glow ,0, 16*2+0,0,25,26,27,28,25, 0,0,0
  902.          dw both,shade ,0, 16*3+0,0,5,1,26,25,5, 0,0,0
  903.          dw both,last ,0, 16*3+0,0,1,4,27,26,1
  904.          dw both,last ,0, 16*3+0,0,4,8,28,27,4
  905.          dw both,last ,0, 16*3+0,0,8,5,25,28,8
  906.  
  907.          dw check+iterate,0,0,0,0 ,2,6,7,2
  908.  
  909.          dw 4
  910.          dw 5
  911.  
  912.          dw 25 dup (0)
  913.  
  914.          ;    x   y   z
  915.          dw -45*4,-70*4,-45*4               ;29
  916.          dw -45*4,-70*4, 45*4               ;30
  917.          dw 45*4,-70*4, 45*4                ;31
  918.          dw 45*4,-70*4,-45*4                ;32
  919.  
  920.          dw both,glow ,0,16*5 +0,0,29,32,31,30,29, 0,0,0
  921.          dw both,shade,0,16*2 +0,0,6,29,30,2,6, 0,0,0
  922.          dw both,last ,0,16*2 +0,0,2,30,31,3,2
  923.          dw both,last ,0,16*2 +0,0,3,31,32,7,3
  924.          dw both,last ,0,16*2 +0,0,7,32,29,6,7
  925.  
  926.          align 4
  927.  
  928. headerarm dd -1
  929.          dd offset cheaparma - offset $ - 4
  930.  
  931. cheaparma dw 8                              ; how many points
  932.          dw 12                              ; how many surfaces
  933.          dw 25 dup (0)                      ; future use
  934.          ;    x   y   z
  935.          dw -70*4, 25*4, 110*4              ;1
  936.          dw -70*4,-25*4, 110*4              ;2
  937.          dw 70*4,-25*4, 110*4               ;3
  938.          dw 70*4, 25*4, 110*4               ;4
  939.          dw -70*4, 25*4,-110*4              ;5
  940.          dw -70*4,-25*4,-110*4              ;6
  941.          dw 70*4,-25*4,-110*4               ;7
  942.          dw 70*4, 25*4,-110*4               ;8
  943.  
  944.          dw normal,shade+mesh,0,16*6 ,0 ,1,2,3,4,1 ,0,0,0
  945.          dw normal,shade+mesh,0,16*6 ,0 ,8,7,6,5,8 ,0,0,0
  946.          dw normal,shade+mesh,0,16*6 ,0 ,4,3,7,8,4 ,0,0,0
  947.          dw normal,shade+mesh,0,16*6 ,0 ,5,6,2,1,5 ,0,0,0
  948.          dw normal,shade+mesh,0,16*6 ,0 ,5,1,4,8,5 ,0,0,0
  949.          dw normal,shade+mesh,0,16*6 ,0 ,2,6,7,3,2 ,0,0,0
  950.          dw push_location
  951.          dw push_matrix
  952.          dw sub_object                      ; this is the same as dw matrix+check+iterate+both,0,0,0,0,0,0
  953.  
  954.          dw 8                               ; how many points
  955.          dw 6                               ; how many surfaces
  956.  
  957.          dw 0,0                             ; reserved, offset of total skip, number of points to skip
  958.          dw 0                               ; flag, +1=is there a point offset below0
  959.          dw 100,520,0                       ; point offset
  960.          dw 1                               ; new matrix load location
  961.          dw 9                               ; point addition for connection data (all points are now point+8, eg 1+8,2+8...)
  962.          dd 5000000                         ; maximum distance object is seen
  963.          dd 200                             ; minimum distance object is seen
  964.          dd 300                             ; tolerancing for x/y max/min
  965.  
  966.          dw 11 dup (0)                      ; future use
  967.          ;    x   y   z
  968.          dw -35*4, 30*4, 30*4               ;10
  969.          dw -35*4,-30*4, 30*4               ;11
  970.          dw 20*4,-30*4, 30*4                ;12
  971.          dw 20*4, 30*4, 30*4                ;13
  972.          dw -35*4, 20*4,-20*4               ;14
  973.          dw -35*4,-20*4,-20*4               ;15
  974.          dw 40*4,-20*4,-20*4                ;16
  975.          dw 40*4, 20*4,-20*4                ;17
  976.  
  977.          dw normal,shade,0,16*4 ,0 ,1,2,3,4,1 ,0,0,0
  978.          dw normal,shade,0,16*4 ,0 ,8,7,6,5,8 ,0,0,0
  979.          dw normal,shade,0,16*4 ,0 ,4,3,7,8,4 ,0,0,0
  980.          dw normal,shade,0,16*4 ,0 ,5,6,2,1,5 ,0,0,0
  981.          dw normal,shade,0,16*4 ,0 ,5,1,4,8,5 ,0,0,0
  982.          dw normal,shade,0,16*4 ,0 ,2,6,7,3,2 ,0,0,0
  983.  
  984.          dw pop_matrix
  985.          dw pop_location
  986.          dw sub_object                      ; this is the same as dw matrix+check+iterate+both,0,0,0,0,0,0
  987.  
  988.          dw 8                               ; how many points
  989.          dw 6                               ; how many surfaces
  990.  
  991.          dw 0,0                             ; reserved
  992.          dw 0                               ; reserved
  993.          dw -100,-530,0                     ; point offset
  994.          dw 2                               ; new matrix load location
  995.          dw 18                              ; connection addition (base)
  996.  
  997.          dw 17 dup (0)                      ; future use
  998.          ;    x   y   z
  999.          dw -40*4, 40*4, 30*4               ;19
  1000.          dw -40*4,-40*4, 30*4               ;20
  1001.          dw 20*4,-40*4, 30*4                ;21
  1002.          dw 20*4, 40*4, 30*4                ;21
  1003.          dw -30*4, 20*4,-50*4               ;22
  1004.          dw -30*4,-20*4,-50*4               ;23
  1005.          dw 40*4,-20*4,-50*4                ;24
  1006.          dw 40*4, 20*4,-50*4                ;25
  1007.  
  1008.          dw normal,shade,0,16*8 ,0 ,1,2,3,4,1 ,0,0,0
  1009.          dw normal,shade,0,16*8 ,0 ,8,7,6,5,8 ,0,0,0
  1010.          dw normal,shade,0,16*8 ,0 ,4,3,7,8,4 ,0,0,0
  1011.          dw normal,shade,0,16*8 ,0 ,5,6,2,1,5 ,0,0,0
  1012.          dw normal,shade,0,16*8 ,0 ,5,1,4,8,5 ,0,0,0
  1013.          dw normal,shade,0,16*8 ,0 ,2,6,7,3,2 ,0,0,0
  1014.  
  1015. ; This is the same object as the boxes above but without  the  main  box.
  1016. ; notice how it starts with 0 points!  the entire object simply points to
  1017. ; other sub-objects.
  1018.  
  1019. headerarm2 dd -1
  1020.          dd offset cheaparma2 - offset $ - 4
  1021.  
  1022. cheaparma2 dw 0                             ; how many points
  1023.          dw 6                               ; how many surfaces
  1024.          dw 25 dup (0)                      ; future use
  1025.  
  1026.          dw push_location
  1027.          dw push_matrix
  1028.          dw sub_object                      ; this is the same as dw matrix+check+iterate,0,0,0,0,0,0
  1029.  
  1030.          dw 8                               ; how many points
  1031.          dw 6                               ; how many surfaces
  1032.  
  1033.          dw 0,0                             ; reserved, offset of total skip, number of points to skip
  1034.          dw 0                               ; flag, +1=is there a point offset below0
  1035.          dw 20,130,0                        ; point offset
  1036.          dw 1                               ; new matrix load location
  1037.          dw 1
  1038.  
  1039.          dw 17 dup (0)                      ; future use
  1040.          ;    x   y   z
  1041.          dw -35, 30, 30                     ;2
  1042.          dw -35,-30, 30                     ;3
  1043.          dw 20,-30, 30                      ;4
  1044.          dw 20, 30, 30                      ;5
  1045.          dw -35, 20,-20                     ;6
  1046.          dw -35,-20,-20                     ;7
  1047.          dw 40,-20,-20                      ;8
  1048.          dw 40, 20,-20                      ;9
  1049.  
  1050.          dw normal,shade,0,16*4 ,0 ,1+0,2+0,3+0,4+0,1+0 ,0,0,0
  1051.          dw normal,shade,0,16*4 ,0 ,8+0,7+0,6+0,5+0,8+0 ,0,0,0
  1052.          dw normal,shade,0,16*4 ,0 ,4+0,3+0,7+0,8+0,4+0 ,0,0,0
  1053.          dw normal,shade,0,16*4 ,0 ,5+0,6+0,2+0,1+0,5+0 ,0,0,0
  1054.          dw normal,shade,0,16*4 ,0 ,5+0,1+0,4+0,8+0,5+0 ,0,0,0
  1055.          dw normal,shade,0,16*4 ,0 ,2+0,6+0,7+0,3+0,2+0 ,0,0,0
  1056.  
  1057.          dw pop_matrix
  1058.          dw pop_location
  1059.          dw sub_object                      ; this is the same as dw matrix+check+iterate,0,0,0,0,0,0
  1060.  
  1061.          dw 8                               ; how many points
  1062.          dw 6                               ; how many surfaces
  1063.  
  1064.          dw 0,0                             ; reserved
  1065.          dw 0
  1066.          dw 20,-120,0                       ; point offset
  1067.          dw 2                               ; new matrix load location
  1068.          dw 2
  1069.  
  1070.          dw 17 dup (0)                      ; future use
  1071.          ;    x   y   z
  1072.          dw -40, 40, 30                     ;11
  1073.          dw -40,-40, 30                     ;12
  1074.          dw 20,-40, 30                      ;13
  1075.          dw 20, 40, 30                      ;14
  1076.          dw -30, 20,-50                     ;15
  1077.          dw -30,-20,-50                     ;16
  1078.          dw 40,-20,-50                      ;17
  1079.          dw 40, 20,-50                      ;18
  1080.  
  1081.          dw normal,shade,0,16*8 ,0 ,1+8*1,2+8*1,3+8*1,4+8*1,1+8*1 ,0,0,0
  1082.          dw normal,shade,0,16*8 ,0 ,8+8*1,7+8*1,6+8*1,5+8*1,8+8*1 ,0,0,0
  1083.          dw normal,shade,0,16*8 ,0 ,4+8*1,3+8*1,7+8*1,8+8*1,4+8*1 ,0,0,0
  1084.          dw normal,shade,0,16*8 ,0 ,5+8*1,6+8*1,2+8*1,1+8*1,5+8*1 ,0,0,0
  1085.          dw normal,shade,0,16*8 ,0 ,5+8*1,1+8*1,4+8*1,8+8*1,5+8*1 ,0,0,0
  1086.          dw normal,shade,0,16*8 ,0 ,2+8*1,6+8*1,7+8*1,3+8*1,2+8*1 ,0,0,0
  1087.  
  1088. archmiddle dd -1
  1089.          dd offset arch1 - offset $ - 4
  1090.  
  1091. arch1    dw 20
  1092.          dw 10
  1093.          dw 0,0,0,0,0,0,0,0
  1094.          dw 17 dup (0)
  1095.  
  1096.          dw 402, 240,-100                   ; 1
  1097.          dw 402, 240, 100                   ; 2
  1098.          dw 402,-240,-100                   ; 3
  1099.          dw 402,-240, 100                   ; 4
  1100.          dw -402,-240,-100                  ; 5
  1101.          dw -402,-240, 100                  ; 6
  1102.          dw -402, 240,-100                  ; 7
  1103.          dw -402, 240, 100                  ; 8
  1104.  
  1105.          dw -330, 100,-100                  ; 9
  1106.          dw -330, 100, 100                  ; 10
  1107.          dw -250, 50,-100                   ; 11
  1108.          dw -250, 50, 100                   ; 12
  1109.          dw -100, 0,-100                    ; 13
  1110.          dw -100, 0, 100                    ; 14
  1111.          dw 50, 50,-100                     ; 15
  1112.          dw 50, 50, 100                     ; 16
  1113.          dw 130, 100,-100                   ; 17
  1114.          dw 130, 100, 100                   ; 18
  1115.          dw 200, 240,-100                   ; 19
  1116.          dw 200, 240, 100                   ; 20
  1117.  
  1118.          dw iterate+onscr+check,0,0,0,0,1,3,5,7,1
  1119.  
  1120.          dw 0
  1121.          dw 6
  1122.          dw 25 dup (0)
  1123.  
  1124.          dw both,0,0,16*6+7,0 ,1,3,17,19,1
  1125.          dw both,0,0,16*6+7,0 ,17,3,15,17
  1126.          dw both,0,0,16*6+7,0 ,15,3,5,13,15
  1127.          dw both,0,0,16*6+7,0 ,13,5,11,13
  1128.          dw both,0,0,16*6+7,0 ,11,5,9,11
  1129.          dw both,0,0,16*6+7,0 ,9,5,7,9
  1130.  
  1131.          dw iterate+onscr+check,0,0,0,0,2,8,6,4,2
  1132.  
  1133.          dw 0
  1134.          dw 6
  1135.          dw 0,0,0,0,0,0,0,1
  1136.          dw 17 dup (0)
  1137.  
  1138.          dw both,0,0,16*6+14,0 ,1,3,17,19,1
  1139.          dw both,0,0,16*6+14,0 ,17,3,15,17
  1140.          dw both,0,0,16*6+14,0 ,15,3,5,13,15
  1141.          dw both,0,0,16*6+14,0 ,13,5,11,13
  1142.          dw both,0,0,16*6+14,0 ,11,5,9,11
  1143.          dw both,0,0,16*6+14,0 ,9,5,7,9
  1144.  
  1145.          dw 0,0,0,16*6+15,0, 3,4,6,5,3
  1146.          dw 0,0,0,16*6+4,0, 1,19,20,2,1
  1147.  
  1148.          dw 0,0,0,16*6+13,0, 7,8,10,9,7
  1149.          dw 0,0,0,16*6+12,0, 9,10,12,11,9
  1150.          dw 0,0,0,16*6+11,0, 11,12,14,13,11
  1151.          dw 0,0,0,16*6+ 9,0, 13,14,16,15,13
  1152.          dw 0,0,0,16*6+ 7,0, 15,16,18,17,15
  1153.          dw 0,0,0,16*6+ 6,0, 17,18,20,19,17
  1154.  
  1155. archmiddl6 dd -1
  1156.          dd offset arch6 - offset $ - 4
  1157.  
  1158. arch6    dw 20
  1159.          dw 10
  1160.          dw 0,0,0,0,0,0,0,0
  1161.          dw 17 dup (0)
  1162.  
  1163.          dw -100, 240,-402                  ; 1
  1164.          dw 100, 240,-402                   ; 2
  1165.          dw -100,-240,-402                  ; 3
  1166.          dw 100,-240,-402                   ; 4
  1167.          dw -100,-240, 402                  ; 5
  1168.          dw 100,-240, 402                   ; 6
  1169.          dw -100, 240, 402                  ; 7
  1170.          dw 100, 240, 402                   ; 8
  1171.  
  1172.          dw -100, 100, 330                  ; 9
  1173.          dw 100, 100, 330                   ; 10
  1174.          dw -100, 50, 250                   ; 11
  1175.          dw 100, 50, 250                    ; 12
  1176.          dw -100, 0, 100                    ; 13
  1177.          dw 100, 0, 100                     ; 14
  1178.          dw -100, 50, -50                   ; 15
  1179.          dw 100, 50, -50                    ; 16
  1180.          dw -100, 100,-130                  ; 17
  1181.          dw 100, 100,-130                   ; 18
  1182.          dw -100, 240,-200                  ; 19
  1183.          dw 100, 240,-200                   ; 20
  1184.  
  1185.          dw iterate+onscr+check,0,0,0,0,1,3,5,7,1
  1186.  
  1187.          dw 0
  1188.          dw 6
  1189.          dw 25 dup (0)
  1190.  
  1191.          dw both,0,0,16*6+7,0 ,1,3,17,19,1
  1192.          dw both,0,0,16*6+7,0 ,17,3,15,17
  1193.          dw both,0,0,16*6+7,0 ,15,3,5,13,15
  1194.          dw both,0,0,16*6+7,0 ,13,5,11,13
  1195.          dw both,0,0,16*6+7,0 ,11,5,9,11
  1196.          dw both,0,0,16*6+7,0 ,9,5,7,9
  1197.  
  1198.          dw iterate+onscr+check,0,0,0,0,2,8,6,4,2
  1199.  
  1200.          dw 0
  1201.          dw 6
  1202.          dw 0,0,0,0,0,0,0,1
  1203.          dw 17 dup (0)
  1204.  
  1205.          dw both,0,0,16*6+14,0 ,1,3,17,19,1
  1206.          dw both,0,0,16*6+14,0 ,17,3,15,17
  1207.          dw both,0,0,16*6+14,0 ,15,3,5,13,15
  1208.          dw both,0,0,16*6+14,0 ,13,5,11,13
  1209.          dw both,0,0,16*6+14,0 ,11,5,9,11
  1210.          dw both,0,0,16*6+14,0 ,9,5,7,9
  1211.  
  1212.          dw 0,0,0,16*6+15,0, 3,4,6,5,3
  1213.          dw 0,0,0,16*6+4,0, 1,19,20,2,1
  1214.  
  1215.          dw 0,0,0,16*6+13,0, 7,8,10,9,7
  1216.          dw 0,0,0,16*6+12,0, 9,10,12,11,9
  1217.          dw 0,0,0,16*6+11,0, 11,12,14,13,11
  1218.          dw 0,0,0,16*6+ 9,0, 13,14,16,15,13
  1219.          dw 0,0,0,16*6+ 7,0, 15,16,18,17,15
  1220.          dw 0,0,0,16*6+ 6,0, 17,18,20,19,17
  1221.  
  1222. archmiddl3 dd -1
  1223.          dd offset arch3 - offset $ - 4
  1224.  
  1225. arch3    dw 20
  1226.          dw 10
  1227.          dw 0,0,0,0,0,0,0,0
  1228.          dw 17 dup (0)
  1229.  
  1230.          dw -402, 240, 100                  ; 1
  1231.          dw -402, 240,-100                  ; 2
  1232.          dw -402,-240, 100                  ; 3
  1233.          dw -402,-240,-100                  ; 4
  1234.          dw 402,-240, 100                   ; 5
  1235.          dw 402,-240,-100                   ; 6
  1236.          dw 402, 240, 100                   ; 7
  1237.          dw 402, 240,-100                   ; 8
  1238.  
  1239.          dw 330, 100, 100                   ; 9
  1240.          dw 330, 100,-100                   ; 10
  1241.          dw 250, 50, 100                    ; 11
  1242.          dw 250, 50,-100                    ; 12
  1243.          dw 100, 0, 100                     ; 13
  1244.          dw 100, 0,-100                     ; 14
  1245.          dw -50, 50, 100                    ; 15
  1246.          dw -50, 50,-100                    ; 16
  1247.          dw -130, 100, 100                  ; 17
  1248.          dw -130, 100,-100                  ; 18
  1249.          dw -200, 240, 100                  ; 19
  1250.          dw -200, 240,-100                  ; 20
  1251.  
  1252.          dw iterate+onscr+check,0,0,0,0,1,3,5,7,1
  1253.  
  1254.          dw 0
  1255.          dw 6
  1256.          dw 25 dup (0)
  1257.  
  1258.          dw both,0,0,16*6+14,0 ,1,3,17,19,1
  1259.          dw both,0,0,16*6+14,0 ,17,3,15,17
  1260.          dw both,0,0,16*6+14,0 ,15,3,5,13,15
  1261.          dw both,0,0,16*6+14,0 ,13,5,11,13
  1262.          dw both,0,0,16*6+14,0 ,11,5,9,11
  1263.          dw both,0,0,16*6+14,0 ,9,5,7,9
  1264.  
  1265.          dw iterate+onscr+check,0,0,0,0,2,8,6,4,2
  1266.  
  1267.          dw 0
  1268.          dw 6
  1269.          dw 0,0,0,0,0,0,0,1
  1270.          dw 17 dup (0)
  1271.  
  1272.          dw both,0,0,16*6+7,0 ,1,3,17,19,1
  1273.          dw both,0,0,16*6+7,0 ,17,3,15,17
  1274.          dw both,0,0,16*6+7,0 ,15,3,5,13,15
  1275.          dw both,0,0,16*6+7,0 ,13,5,11,13
  1276.          dw both,0,0,16*6+7,0 ,11,5,9,11
  1277.          dw both,0,0,16*6+7,0 ,9,5,7,9
  1278.  
  1279.          dw 0,0,0,16*6+15,0, 3,4,6,5,3
  1280.          dw 0,0,0,16*6+4,0, 1,19,20,2,1
  1281.  
  1282.          dw 0,0,0,16*6+ 5,0, 7,8,10,9,7
  1283.          dw 0,0,0,16*6+ 6,0, 9,10,12,11,9
  1284.          dw 0,0,0,16*6+ 8,0, 11,12,14,13,11
  1285.          dw 0,0,0,16*6+10,0, 13,14,16,15,13
  1286.          dw 0,0,0,16*6+11,0, 15,16,18,17,15
  1287.          dw 0,0,0,16*6+13,0, 17,18,20,19,17
  1288.  
  1289. archmiddl4 dd -1
  1290.          dd offset arch4 - offset $ - 4
  1291.  
  1292. arch4    dw 20
  1293.          dw 10
  1294.          dw 0,0,0,0,0,0,0,0
  1295.          dw 17 dup (0)
  1296.  
  1297.          dw 100, 240, 402                   ; 1
  1298.          dw -100, 240, 402                  ; 2
  1299.          dw 100,-240, 402                   ; 3
  1300.          dw -100,-240, 402                  ; 4
  1301.          dw 100,-240,-402                   ; 5
  1302.          dw -100,-240,-402                  ; 6
  1303.          dw 100, 240,-402                   ; 7
  1304.          dw -100, 240,-402                  ; 8
  1305.  
  1306.          dw 100, 100,-330                   ; 9
  1307.          dw -100, 100,-330                  ; 10
  1308.          dw 100, 50,-250                    ; 11
  1309.          dw -100, 50,-250                   ; 12
  1310.          dw 100, 0,-100                     ; 13
  1311.          dw -100, 0,-100                    ; 14
  1312.          dw 100, 50, 50                     ; 15
  1313.          dw -100, 50, 50                    ; 16
  1314.          dw 100, 100, 130                   ; 17
  1315.          dw -100, 100, 130                  ; 18
  1316.          dw 100, 240, 200                   ; 19
  1317.          dw -100, 240, 200                  ; 20
  1318.  
  1319.          dw iterate+onscr+check,0,0,0,0,1,3,5,7,1
  1320.  
  1321.          dw 0
  1322.          dw 6
  1323.          dw 25 dup (0)
  1324.  
  1325.          dw both,0,0,16*6+7,0 ,1,3,17,19,1
  1326.          dw both,0,0,16*6+7,0 ,17,3,15,17
  1327.          dw both,0,0,16*6+7,0 ,15,3,5,13,15
  1328.          dw both,0,0,16*6+7,0 ,13,5,11,13
  1329.          dw both,0,0,16*6+7,0 ,11,5,9,11
  1330.          dw both,0,0,16*6+7,0 ,9,5,7,9
  1331.  
  1332.          dw iterate+onscr+check,0,0,0,0,2,8,6,4,2
  1333.  
  1334.          dw 0
  1335.          dw 6
  1336.          dw 0,0,0,0,0,0,0,1
  1337.          dw 17 dup (0)
  1338.  
  1339.          dw both,0,0,16*6+14,0 ,1,3,17,19,1
  1340.          dw both,0,0,16*6+14,0 ,17,3,15,17
  1341.          dw both,0,0,16*6+14,0 ,15,3,5,13,15
  1342.          dw both,0,0,16*6+14,0 ,13,5,11,13
  1343.          dw both,0,0,16*6+14,0 ,11,5,9,11
  1344.          dw both,0,0,16*6+14,0 ,9,5,7,9
  1345.  
  1346.          dw 0,0,0,16*6+15,0, 3,4,6,5,3
  1347.          dw 0,0,0,16*6+4,0, 1,19,20,2,1
  1348.  
  1349.          dw 0,0,0,16*6+13,0, 7,8,10,9,7
  1350.          dw 0,0,0,16*6+12,0, 9,10,12,11,9
  1351.          dw 0,0,0,16*6+11,0, 11,12,14,13,11
  1352.          dw 0,0,0,16*6+ 9,0, 13,14,16,15,13
  1353.          dw 0,0,0,16*6+ 7,0, 15,16,18,17,15
  1354.          dw 0,0,0,16*6+ 6,0, 17,18,20,19,17
  1355.  
  1356. archend  dd -1
  1357.          dd offset arch2 - offset $ - 4
  1358.  
  1359. arch2    dw 21
  1360.          dw 11
  1361.          dw 0,0,0,0,0,0,0,0
  1362.          dw 17 dup (0)
  1363.  
  1364.          dw 402, 240,-100                   ; 1
  1365.          dw 402, 240, 100                   ; 2
  1366.          dw 402,-240,-100                   ; 3
  1367.          dw 402,-240, 100                   ; 4
  1368.          dw -402,-240,-100                  ; 5
  1369.          dw -402,-240, 100                  ; 6
  1370.          dw -402, 240,-100                  ; 7
  1371.          dw -402, 240, 100                  ; 8
  1372.  
  1373.          dw -330, 100,-100                  ; 9
  1374.          dw -330, 100, 100                  ; 10
  1375.          dw -250, 50,-100                   ; 11
  1376.          dw -250, 50, 100                   ; 12
  1377.          dw -100, 0,-100                    ; 13
  1378.          dw -100, 0, 100                    ; 14
  1379.          dw 50, 50,-100                     ; 15
  1380.          dw 50, 50, 100                     ; 16
  1381.          dw 130, 100,-100                   ; 17
  1382.          dw 130, 100, 100                   ; 18
  1383.          dw 200, 240,-100                   ; 19
  1384.          dw 200, 240, 100                   ; 20
  1385.  
  1386.          dw 200,-240, 100                   ; 21
  1387.  
  1388.          dw iterate+onscr+check,0,0,0,0,1,3,5,7,1
  1389.  
  1390.          dw 0
  1391.          dw 6
  1392.          dw 25 dup (0)
  1393.  
  1394.          dw both,0,0,16*6+7,0 ,1,3,17,19,1
  1395.          dw both,0,0,16*6+7,0 ,17,3,15,17
  1396.          dw both,0,0,16*6+7,0 ,15,3,5,13,15
  1397.          dw both,0,0,16*6+7,0 ,13,5,11,13
  1398.          dw both,0,0,16*6+7,0 ,11,5,9,11
  1399.          dw both,0,0,16*6+7,0 ,9,5,7,9
  1400.  
  1401.          dw iterate+onscr+check,0,0,0,0,2,8,6,4,2
  1402.  
  1403.          dw 0
  1404.          dw 6
  1405.          dw 0,0,0,0,0,0,0,1
  1406.          dw 17 dup (0)
  1407.  
  1408.          dw both,0,0,16*6+14,0 ,20,17,19,20
  1409.          dw both,0,0,16*6+14,0 ,17,20,15,17
  1410.          dw both,0,0,16*6+14,0 ,15,20,5,13,15
  1411.          dw both,0,0,16*6+14,0 ,13,5,11,13
  1412.          dw both,0,0,16*6+14,0 ,11,5,9,11
  1413.          dw both,0,0,16*6+14,0 ,9,5,7,9
  1414.  
  1415.          dw 0,0,0,16*6+15,0, 3,4,6,5,3
  1416.          dw 0,0,0,16*6+4,0, 1,19,20,2,1
  1417.          dw 0,0,0,16*6+7,0, 1,2,4,3,1
  1418.  
  1419.          dw 0,0,0,16*6+13,0, 7,8,10,9,7
  1420.          dw 0,0,0,16*6+12,0, 9,10,12,11,9
  1421.          dw 0,0,0,16*6+11,0, 11,12,14,13,11
  1422.          dw 0,0,0,16*6+ 9,0, 13,14,16,15,13
  1423.          dw 0,0,0,16*6+ 7,0, 15,16,18,17,15
  1424.          dw 0,0,0,16*6+ 6,0, 17,18,20,19,17
  1425.  
  1426. column   dd -1
  1427.          dd offset colmn1 - offset $ - 4
  1428.  
  1429. colmn1   dw 16
  1430.          dw 8
  1431.          dw 0,0,0,0,0,0,0,0
  1432.          dw 17 dup (0)
  1433.  
  1434.          dw 32,-450,-80                     ; 1
  1435.          dw 80,-450,-32                     ; 2
  1436.          dw 80,-450, 32                     ; 3
  1437.          dw 32,-450, 80                     ; 4
  1438.          dw -32,-450, 80                    ; 5
  1439.          dw -80,-450, 32                    ; 6
  1440.          dw -80,-450,-32                    ; 7
  1441.          dw -32,-450,-80                    ; 8
  1442.          dw 32, 450,-80                     ; 9
  1443.          dw 80, 450,-32                     ;10
  1444.          dw 80, 450, 32                     ;11
  1445.          dw 32, 450, 80                     ;12
  1446.          dw -32, 450, 80                    ;13
  1447.          dw -80, 450, 32                    ;14
  1448.          dw -80, 450,-32                    ;15
  1449.          dw -32, 450,-80                    ;16
  1450.  
  1451.          dw 0,0,0,16*3+ 6,0, 1,8,16,9,1
  1452.          dw 0,0,0,16*3+ 8,0, 2,1,9,10,2
  1453.          dw 0,0,0,16*3+10,0, 3,2,10,11,3
  1454.          dw 0,0,0,16*3+12,0, 4,3,11,12,4
  1455.          dw 0,0,0,16*3+14,0, 5,4,12,13,5
  1456.          dw 0,0,0,16*3+11,0, 6,5,13,14,6
  1457.          dw 0,0,0,16*3+ 9,0, 7,6,14,15,7
  1458.          dw 0,0,0,16*3+ 7,0, 8,7,15,16,8
  1459.  
  1460. fourdrums dd -1
  1461.          dd offset oil4 - offset $ - 4
  1462.  
  1463. oil4     dw 0
  1464.          dw 4
  1465.          dw 25 dup (0)
  1466.  
  1467.          dw static_sub_object
  1468.  
  1469.          dw 16
  1470.          dw 9
  1471.          dw 0,0,0
  1472.          dw 2000,0,-2000
  1473.          dw 0,0
  1474.          dw 17 dup (0)
  1475.  
  1476.          dw 290,-350,-700                   ; 1
  1477.          dw 700,-350,-290                   ; 2
  1478.          dw 700,-350, 290                   ; 3
  1479.          dw 290,-350, 700                   ; 4
  1480.          dw -290,-350, 700                  ; 5
  1481.          dw -700,-350, 290                  ; 6
  1482.          dw -700,-350,-290                  ; 7
  1483.          dw -290,-350,-700                  ; 8
  1484.          dw 290, 350,-700                   ; 9
  1485.          dw 700, 350,-290                   ;10
  1486.          dw 700, 350, 290                   ;11
  1487.          dw 290, 350, 700                   ;12
  1488.          dw -290, 350, 700                  ;13
  1489.          dw -700, 350, 290                  ;14
  1490.          dw -700, 350,-290                  ;15
  1491.          dw -290, 350,-700                  ;16
  1492.  
  1493.          dw 0,0,0,16*2+ 6,0, 1,8,16,9,1
  1494.          dw 0,0,0,16*2+ 8,0, 2,1,9,10,2
  1495.          dw 0,0,0,16*2+10,0, 3,2,10,11,3
  1496.          dw 0,0,0,16*2+12,0, 4,3,11,12,4
  1497.          dw 0,0,0,16*2+14,0, 5,4,12,13,5
  1498.          dw 0,0,0,16*2+11,0, 6,5,13,14,6
  1499.          dw 0,0,0,16*2+ 9,0, 7,6,14,15,7
  1500.          dw 0,0,0,16*2+ 7,0, 8,7,15,16,8
  1501.          dw 0,0,0,16*2+15,0, 1,2,3,4,5,6,7,8,1
  1502.  
  1503.          dw static_sub_object
  1504.  
  1505.          dw 16
  1506.          dw 9
  1507.          dw 0,0,0
  1508.          dw 0,0,4000
  1509.          dw 0,16
  1510.          dw 17 dup (0)
  1511.  
  1512.          dw 290,-350,-700                   ; 1
  1513.          dw 700,-350,-290                   ; 2
  1514.          dw 700,-350, 290                   ; 3
  1515.          dw 290,-350, 700                   ; 4
  1516.          dw -290,-350, 700                  ; 5
  1517.          dw -700,-350, 290                  ; 6
  1518.          dw -700,-350,-290                  ; 7
  1519.          dw -290,-350,-700                  ; 8
  1520.          dw 290, 350,-700                   ; 9
  1521.          dw 700, 350,-290                   ;10
  1522.          dw 700, 350, 290                   ;11
  1523.          dw 290, 350, 700                   ;12
  1524.          dw -290, 350, 700                  ;13
  1525.          dw -700, 350, 290                  ;14
  1526.          dw -700, 350,-290                  ;15
  1527.          dw -290, 350,-700                  ;16
  1528.  
  1529.          dw 0,0,0,16*2+ 6,0, 1,8,16,9,1
  1530.          dw 0,0,0,16*2+ 8,0, 2,1,9,10,2
  1531.          dw 0,0,0,16*2+10,0, 3,2,10,11,3
  1532.          dw 0,0,0,16*2+12,0, 4,3,11,12,4
  1533.          dw 0,0,0,16*2+14,0, 5,4,12,13,5
  1534.          dw 0,0,0,16*2+11,0, 6,5,13,14,6
  1535.          dw 0,0,0,16*2+ 9,0, 7,6,14,15,7
  1536.          dw 0,0,0,16*2+ 7,0, 8,7,15,16,8
  1537.          dw 0,0,0,16*2+15,0, 1,2,3,4,5,6,7,8,1
  1538.  
  1539.          dw static_sub_object
  1540.  
  1541.          dw 16
  1542.          dw 9
  1543.          dw 0,0,0
  1544.          dw -4000,0,0
  1545.          dw 0,32
  1546.          dw 17 dup (0)
  1547.  
  1548.          dw 290,-350,-700                   ; 1
  1549.          dw 700,-350,-290                   ; 2
  1550.          dw 700,-350, 290                   ; 3
  1551.          dw 290,-350, 700                   ; 4
  1552.          dw -290,-350, 700                  ; 5
  1553.          dw -700,-350, 290                  ; 6
  1554.          dw -700,-350,-290                  ; 7
  1555.          dw -290,-350,-700                  ; 8
  1556.          dw 290, 350,-700                   ; 9
  1557.          dw 700, 350,-290                   ;10
  1558.          dw 700, 350, 290                   ;11
  1559.          dw 290, 350, 700                   ;12
  1560.          dw -290, 350, 700                  ;13
  1561.          dw -700, 350, 290                  ;14
  1562.          dw -700, 350,-290                  ;15
  1563.          dw -290, 350,-700                  ;16
  1564.  
  1565.          dw 0,0,0,16*2+ 6,0, 1,8,16,9,1
  1566.          dw 0,0,0,16*2+ 8,0, 2,1,9,10,2
  1567.          dw 0,0,0,16*2+10,0, 3,2,10,11,3
  1568.          dw 0,0,0,16*2+12,0, 4,3,11,12,4
  1569.          dw 0,0,0,16*2+14,0, 5,4,12,13,5
  1570.          dw 0,0,0,16*2+11,0, 6,5,13,14,6
  1571.          dw 0,0,0,16*2+ 9,0, 7,6,14,15,7
  1572.          dw 0,0,0,16*2+ 7,0, 8,7,15,16,8
  1573.          dw 0,0,0,16*2+15,0, 1,2,3,4,5,6,7,8,1
  1574.  
  1575.          dw static_sub_object
  1576.  
  1577.          dw 16
  1578.          dw 9
  1579.          dw 0,0,0
  1580.          dw 0,0,-4000
  1581.          dw 0,48
  1582.          dw 17 dup (0)
  1583.  
  1584.          dw 290,-350,-700                   ; 1
  1585.          dw 700,-350,-290                   ; 2
  1586.          dw 700,-350, 290                   ; 3
  1587.          dw 290,-350, 700                   ; 4
  1588.          dw -290,-350, 700                  ; 5
  1589.          dw -700,-350, 290                  ; 6
  1590.          dw -700,-350,-290                  ; 7
  1591.          dw -290,-350,-700                  ; 8
  1592.          dw 290, 350,-700                   ; 9
  1593.          dw 700, 350,-290                   ;10
  1594.          dw 700, 350, 290                   ;11
  1595.          dw 290, 350, 700                   ;12
  1596.          dw -290, 350, 700                  ;13
  1597.          dw -700, 350, 290                  ;14
  1598.          dw -700, 350,-290                  ;15
  1599.          dw -290, 350,-700                  ;16
  1600.  
  1601.          dw 0,0,0,16*2+ 6,0, 1,8,16,9,1
  1602.          dw 0,0,0,16*2+ 8,0, 2,1,9,10,2
  1603.          dw 0,0,0,16*2+10,0, 3,2,10,11,3
  1604.          dw 0,0,0,16*2+12,0, 4,3,11,12,4
  1605.          dw 0,0,0,16*2+14,0, 5,4,12,13,5
  1606.          dw 0,0,0,16*2+11,0, 6,5,13,14,6
  1607.          dw 0,0,0,16*2+ 9,0, 7,6,14,15,7
  1608.          dw 0,0,0,16*2+ 7,0, 8,7,15,16,8
  1609.          dw 0,0,0,16*2+15,0, 1,2,3,4,5,6,7,8,1
  1610.  
  1611. bigoildrum dd -1
  1612.          dd offset oil1 - offset $ - 4
  1613.  
  1614. oil1     dw 16
  1615.          dw 9
  1616.          dw 0,0,0,0,0,0,0,0
  1617.          dw 17 dup (0)
  1618.  
  1619.          dw 290,-350,-700                   ; 1
  1620.          dw 700,-350,-290                   ; 2
  1621.          dw 700,-350, 290                   ; 3
  1622.          dw 290,-350, 700                   ; 4
  1623.          dw -290,-350, 700                  ; 5
  1624.          dw -700,-350, 290                  ; 6
  1625.          dw -700,-350,-290                  ; 7
  1626.          dw -290,-350,-700                  ; 8
  1627.          dw 290, 350,-700                   ; 9
  1628.          dw 700, 350,-290                   ;10
  1629.          dw 700, 350, 290                   ;11
  1630.          dw 290, 350, 700                   ;12
  1631.          dw -290, 350, 700                  ;13
  1632.          dw -700, 350, 290                  ;14
  1633.          dw -700, 350,-290                  ;15
  1634.          dw -290, 350,-700                  ;16
  1635.  
  1636.          dw 0,0,0,16*2+ 6,0, 1,8,16,9,1
  1637.          dw 0,0,0,16*2+ 8,0, 2,1,9,10,2
  1638.          dw 0,0,0,16*2+10,0, 3,2,10,11,3
  1639.          dw 0,0,0,16*2+12,0, 4,3,11,12,4
  1640.          dw 0,0,0,16*2+14,0, 5,4,12,13,5
  1641.          dw 0,0,0,16*2+11,0, 6,5,13,14,6
  1642.          dw 0,0,0,16*2+ 9,0, 7,6,14,15,7
  1643.          dw 0,0,0,16*2+ 7,0, 8,7,15,16,8
  1644.          dw 0,0,0,16*2+15,0, 1,2,3,4,5,6,7,8,1
  1645.  
  1646.          align 4
  1647.  
  1648. futurecrewrip1:
  1649.          dd -1
  1650.          dd offset fcrip1 - offset $ - 4
  1651.  
  1652. fcrip1:  dw 17
  1653.          dw 12
  1654.          dw 25 dup (0)
  1655.  
  1656.          dw -200, 130,-200
  1657.          dw 200, 130,-200
  1658.          dw 200, 130, 200
  1659.          dw -200, 130, 200
  1660.          dw -110, 0,-110
  1661.          dw -55, 5,-110
  1662.          dw 55, 5,-110
  1663.          dw 110, 0,-110
  1664.          dw 110, 5, -55
  1665.          dw 110, 5, 55
  1666.          dw 110, 0, 110
  1667.          dw 55, 5, 110
  1668.          dw -55, 5, 110
  1669.          dw -110, 0, 110
  1670.          dw -110, 5, 55
  1671.          dw -110, 5, -55
  1672.          dw 0,-280, 0
  1673.  
  1674.          dw double,0,0,16*3+11,16*1+ 3, 1,2,8,5,1
  1675.          dw double,0,0,16*3+14,16*1+ 5, 2,3,11,8,2
  1676.          dw double,0,0,16*3+ 8,16*1+ 7, 3,4,14,11,3
  1677.          dw double,0,0,16*3+ 4,16*1+ 9, 4,1,5,14,4
  1678.          dw double,0,0,16*3+15,16*1+0, 17,5,6,17
  1679.          dw double,0,0,16*3+15,16*1+0, 17,7,8,17
  1680.          dw double,0,0,16*3+12,16*1+2, 17,8,9,17
  1681.          dw double,0,0,16*3+12,16*1+2, 17,10,11,17
  1682.          dw double,0,0,16*3+ 9,16*1+4, 17,11,12,17
  1683.          dw double,0,0,16*3+ 9,16*1+4, 17,13,14,17
  1684.          dw double,0,0,16*3+ 6,16*1+6, 17,14,15,17
  1685.          dw double,0,0,16*3+ 6,16*1+6, 17,16,5,17
  1686.  
  1687.  
  1688. zzline dd -1
  1689.        dd offset zz1 - offset $ - 4
  1690.  
  1691. zz1:   dw 1
  1692.        dw 1
  1693.  
  1694.        dw 25 dup (0)
  1695.  
  1696.        dw 0,0,2000
  1697.  
  1698.        dw 0,0,0,14,0,0,1,0
  1699.